/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tanks.items;
import tanks.weapons.Plasmagun;
import com.sun.lwuit.Image;
import java.io.IOException;
import tanks.Cell;
import tanks.Tank;

/**
 *
 * @author Александр
 */
public class Item_plasmagun extends Item
    {
        public Item_plasmagun(Cell c)
        {
            C = c;
            try {
                Gr = Image.createImage("/images/gun3.png");
            }
            catch(IOException ex){
                 ex.printStackTrace();
            }
        }
        protected void Pickup(Tank t)
        {
            if (t.AddWeap(new Plasmagun(t)))
            {
               game.Items.removeElement(this);
            }
        }
    }
